frame clock: schedule in refresh intervals
authorYariv Barkan <21448-yarivb@users.noreply.gitlab.gnome.org>
Sat, 30 May 2020 21:23:24 +0000 (00:23 +0300)
committerAlexander Larsson <alexl@redhat.com>
Fri, 5 Jun 2020 09:57:49 +0000 (11:57 +0200)
When the application does not receive "frame drawn" signals we schedule
the clock to run more or less at intervals equal to the last known
refresh interval. In order to minimize clock skew we have to aim for
exact intervals.

gdk/gdkframeclockidle.c

index 3b54429bf6c62abe3e3b97e4301a329ea419551e..1a345c8ec08677f6e9bbfb8d93beaaef21388be9 100644 (file)
@@ -559,7 +559,7 @@ gdk_frame_clock_paint_idle (void *data)
   if (priv->freeze_count == 0)
     {
       priv->min_next_frame_time = compute_min_next_frame_time (clock_idle,
-                                                               priv->frame_time);
+                                                               priv->smoothed_frame_time_base);
       maybe_start_idle (clock_idle, FALSE);
     }